<%# no need for thumbnails unless there is more than one image %>
<% if (@product.images + @product.variant_images).uniq.size > 1 %>
  <ul id="product-thumbnails" class="thumbnails inline" data-hook>
    <% @product.images.each do |i| %>
      <li class='tmb-all tmb-<%= i.viewable.id %>'>
        <%= link_to(image_tag(i.attachment.url(:mini)), i.attachment.url(:product)) %>
      </li>
    <% end %>

    <% if @product.has_variants? %>
      <% @product.variant_images.each do |i| %>
        <% next if @product.images.include?(i) %>
        <li class='vtmb tmb-<%= i.viewable.id %>'>
          <%= link_to(image_tag(i.attachment.url(:mini)), i.attachment.url(:product)) %>
        </li>
      <% end %>
    <% end %>
  </ul>
<% end %>
